/* 
 * File:   itemslottest.cpp
 * Author: reinhard
 *
 * Created on March 12, 2011, 4:14 PM
 */

#include <cstdio>
#include <stdlib.h>
#include "gtest/gtest.h"
#include "item.hpp"
#include "itemslot.hpp"
#include "fruit.hpp"

/*
  ItemSlot(Item* original_item);
  void add(Item* item);
  Item* getItem();
  void remove(Item* item);
*/

TEST(ItemSlotTest, SingleTest) {
  Item* a = new Fruit(0,0);
  Item* b = new Fruit(0,0);
  ItemSlot c(0, a);

  c.add(b);
  EXPECT_EQ(c.getItem(),b);
  c.add(a);
  EXPECT_EQ(c.getItem(),a);
}
